﻿using MDAControlsFramework;
using MDAControlsFramework.Helpers;

namespace MDACalendar.CalendarControls {
	class ControlMonthHead: MDALabel {
		public override void Initialize() {
			base.Initialize();

			SetDataChangeEvent(this, "monthContainer", SetText);
		}

		public void SetText(object sender, MDADataChangeArgs e) {
			this.Text = Settings.GetDateTime(e.NewValue).ToString("MMMM yyyy");
			this.Invalidate();
		}
	}
}
